import request from '@/utils/request'

// 查询 账户列表
export function getCpAccountList(query) {
    return request({
        url: '/trade/counterparty/queryCounterpartyByPage.action',
        method: 'get',
        params: query
    })
}

export function queryAccountByPartyId(query) {
    // return request({
    //     url: '/trade/account/queryAccountNoFilterByPage.action',
    //     method: 'get',
    //     params: query
    // })
}

export function saveAccount(query) {
    return request({
        url: '/trade/account/addAccount.action',
        method: 'post',
        params: query
    })
}

export function deleteAccount(query) {
    return request({
        url: '/trade/account/deleteAccount.action',
        method: 'post',
        params: query
    })
}

export function updateAccount(query) {
    return request({
        url: '/trade/account/updateAccount.action',
        method: 'post',
        params: query
    })
}

export function queryAccountDetail(query) {
    return request({
        url: '/trade/counterparty/queryCounterparty4Combox.action',
        method: 'get',
        params: query
    })
}

export function updateCounterparty(query) {
    return request({
        url: '/trade/counterparty/updateCounterparty.action',
        method: 'post',
        data: query
    })
}

export function saveCounterparty(query) {
    return request({
        url: '/trade/counterparty/insertCounterparty.action',
        method: 'post',
        data: query
    })
}

export function deleteCounterparty(counterparty) {
    return request({
        url: '/trade/counterparty/deleteCounterparty.action',
        method: 'post',
        data: counterparty
    })
}

